//
//  LTView.m
//  UIComprehensive
//
//  Created by lanou3g on 16/1/25.
//  Copyright © 2016年 徐强. All rights reserved.
//

#import "LTView.h"

@implementation LTView
- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self ) {
        [self addAllView];
    }
    return self;
}

- (void)addAllView{
    
    self.label = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.frame) * 0.3, self.frame.size.height)];
    [self addSubview:self.label];
    
    self.textField = [[UITextField alloc]initWithFrame:CGRectMake(CGRectGetWidth(self.frame) * 0.3, 0, self.frame.size.width * 0.7, self.frame.size.height)];
    self.textField.borderStyle = UITextBorderStyleRoundedRect;
    self.textField.clearButtonMode = UITextFieldViewModeAlways;
    [self addSubview:self.textField];
    self.textField.delegate = self;
}
//键盘回收
- (BOOL)textFieldShouldReturn:(UITextField *)textField{
    [textField resignFirstResponder];
    return YES;
}


@end
